#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Desc: decorator test

def my_decorator(func):
    def wrapper():
        print('wrapper of decorator')
        func()
    return wrapper

# Method 1
# def greet():
#     print('hello world!')

# g = my_decorator(greet)
# g()

# 使用@
@my_decorator
def greet():
    print('hello world!')

greet()

